/*
 * @Description: 
 * @Author: mmzhang
 * @Date: 2022-03-09 11:28:30
 * @LastEditTime: 2022-07-18 09:30:09
 */
import dt from '@dt/dt'
import toolMgr from '@/biz/base/tool.js'
import ProBuildUnit from '@/biz/option/proBuildUnit'

function options(_this) {
  let proBuildUnit = new ProBuildUnit()
  let arr = [
    {
      key: 'receiptType',
      title: '回款类型',
      select: {
        options: dt.dictInfo().returnedMoneyType,
      }
    },
    {
      key: 'contractCode',
      title: '签约单编号',
      input: {},
      placeholder: '请输入签约单编号',
    },
    ...proBuildUnit.options(_this, false, false)
  ]
  if (_this.searchInfo.taskType == 2) {
    let obj = {
      key: 'status',
      title: '回款状态',
      select: {
        options: dt.dictInfo().taskContractFinish,
      }
    }
    arr.unshift(obj)
  } else {
    let obj = {
      key: 'status',
      title: '回款状态',
      select: {
        options: dt.dictInfo().taskContractCompleted,
      }
    }
    arr.unshift(obj)
  }
  return arr
}

export default {
  options
}